<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                template="./template.xhtml">

    <ui:define name="htmlHead">
        <title>Duke's Tutoring: ${bundle['status.page.title']}</title>
    </ui:define>

    <ui:define name="title">
        <h1>Duke's Tutoring: ${bundle['status.page.title']}</h1>
    </ui:define>

    <ui:define name="body">
        <h2>${bundle['status.table.title']}</h2>
        <h:form>
            <h:dataTable value="#{requestBean.currentStatusEntries}" var="statusEntry" rowClasses="table-row-odd,table-row-even">
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="#{bundle['student.name']}" />
                    </f:facet>
                    <h:outputText value="#{statusEntry.student.name}" />
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="${bundle['student.status']}" />
                    </f:facet>
                    <h:outputText value="#{statusManager.getLocalizedStatus(statusEntry.currentStatus)}" />
                </h:column>
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="${bundle['status.timestamp']}" />
                    </f:facet>
                    <h:outputText value="#{statusEntry.formattedStatusDate}" />
                </h:column>
            </h:dataTable>
        </h:form>
    </ui:define>

</ui:composition>

